<template>
  <div class="bridge-item">
    <div class="title">
      {{ data.line.lineName }}
    </div>
    <van-cell
      :title="car.pedestalNum"
      :value="car.position"
      v-for="(car, index) in data.cars"
      :key="index"
    />
  </div>
</template>

<script>
import dayjs from "dayjs";
export default {
  name: "BridgeItem",
  props: {
    data: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
      dayjs
    };
  },
};
</script>

<style lang="scss" scoped>
.bridge-item {
  padding: 15px;
  border-bottom: 1px solid #f6f6f6;
  .title {
    line-height: 1.5;
    font-size: 16px;
    font-weight: 600;
    padding-left: 15px;
    position: relative;
    margin-bottom: 10px;
    &::before {
      content: "";
      position: absolute;
      display: block;
      width: 4px;
      height: 20px;
      border-radius: 2px;
      background: #488fec;
      top: 50%;
      margin-top: -10px;
      left: 0px;
    }
  }
}
</style>
